/*
package pinboard.dataLayer.net;

import pinboard.dataLayer.potocol.instructFormat.result.JoinMeetingResult;
import pinboard.dataLayer.potocol.instructFormat.result.UpdateMeetingStateResult;
import pinboard.dataLayer.potocol.op.InstructClientDecodeListener;
import pinboard.dataLayer.potocol.op.InstructClientDecoder;
import pinboard.dataLayer.potocol.instructFormat.BaseResponse;

public class InstructClient {

    protected InstructClientPipe pipe;

    public InstructClient(NetAddressInfo address) {
        pipe = new InstructClientPipe(address, createClientPipeListener());
    }

    private ClientPipeListener createClientPipeListener() {

        final InstructClientDecodeListener icdl = new InstructClientDecodeListener() {
            @Override
            public void onKeepAlive(BaseResponse response) {
                //TODO
            }

            @Override
            public void onUpdateMeetingState(BaseResponse response, UpdateMeetingStateResult result) {
                //TODO
            }

            @Override
            public void onJoinMeeting(BaseResponse response, JoinMeetingResult result) {
                //TODO
            }
        };

        return new ClientPipeListener() {

            @Override
            public void onDisconnect(BaseClientPipe clientPipe) {
                //TODO
            }

            @Override
            public void onMessage(BaseClientPipe clientPipe, byte[] data) {
                InstructClientDecoder.decode(data, icdl);
            }
        };
    }

    public void connect(int timeOutMillis, ActionCallback<PipeContext> callback) {
        final int inTimeOutMillis = timeOutMillis;
        final ActionCallback<PipeContext> inCallback = callback;
        new Thread(new Runnable() {
            @Override
            public void run() {
                pipe.connect(inTimeOutMillis, inCallback);
            }
        }).start();
    }
}
*/
